import 'dart:convert';

class QBanner {
  String id;
  String remarks;
  String createBy;
  String createDate;
  String updateBy;
  String updateDate;
  String pageNo;
  String pageSize;
  String bannerId;
  String title;
  String path;
  String authStatus;
  String link;

  QBanner({
    this.id,
    this.remarks,
    this.createBy,
    this.createDate,
    this.updateBy,
    this.updateDate,
    this.pageNo,
    this.pageSize,
    this.bannerId,
    this.title,
    this.path,
    this.authStatus,
    this.link,
  });

  factory QBanner.fromJson(Map<String, dynamic> data) {
    return QBanner(
      id: data['id'],
      remarks: data['remarks'],
      createBy: data['createBy'],
      createDate: data['createDate'],
      updateBy: data['updateBy'],
      updateDate: data['updateDate'],
      pageNo: data['pageNo'],
      pageSize: data['pageSize'],
      bannerId: data['bannerId'],
      title: data['title'],
      path: data['path'],
      authStatus: data['authStatus'],
      link: data['link'],
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'remarks': remarks,
      'createBy': createBy,
      'createDate': createDate,
      'updateBy': updateBy,
      'updateDate': updateDate,
      'pageNo': pageNo,
      'pageSize': pageSize,
      'bannerId': bannerId,
      'title': title,
      'path': path,
      'authStatus': authStatus,
      'link': link,
    };
  }

  @override
  String toString() {
    return json.encode(toJson());
  }
}
